package com.zw.pdm.module.contact.mapper;


import com.zw.pdm.entity.sys.User;
import com.zw.pdm.module.afterSale.model.ProjectModel;
import com.zw.pdm.module.contact.model.Contact;
import com.zw.pdm.module.contact.model.ContactModel;
import com.zw.pdm.module.contact.model.Post;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ContactDao {


    List<ProjectModel> selectLikeProCode(String proCode);

    ProjectModel selectProInfoByCode(String proCode);



    List<ContactModel> queryRcontactInfoByCid(int id);

//    String queryCanYuRenByBranchId(int branchId);

//    void updateContact(ContactModel cModel);

//    void deleteRContactByBranchId(@Param("branchId") int branchId, @Param("dsnContactId")Integer dsnContactId);



//    List<ContactModel> queryCanYuRenIdList(int id);

//    List<ContactModel> queryCreateIdList();

//    List<ContactModel> queryContactList2(ContactModel contactModel);


    /*****************************************************************************************************/

    Post getDept(Post post);


    Contact queryContactByDetailId(int detailId);

    Contact queryCreateContactByConId(int conId);

    void insertNewContact(Contact contact);

    void insertNewContactDetail1(Contact contact);

    void insertNewContactDetail2(Contact contact);

    List<Contact> queryContactList(Contact contact);

    Contact queryCcontactInfoById(@Param("id") int id);

    List<Contact> queryOtherContents(@Param("id") int id);

    List<Post> queryCanYuPosts(@Param("id") int id);

    Contact queryCreateInfo(int detailId);

    void updateContactByConId(Contact contact);

    void updateCreateDetailByConId(@Param("conId") Integer conId, @Param("content") String content);

    void updateCanYuDetailByConId(@Param("conId") Integer conId, @Param("content") String content, @Param("deptId") Integer deptId
    ,@Param("userId") Integer userId, @Param("userName") String userName,@Param("postTel") String postTel);

    void deleteCanYuContact(Integer dsnContactId);

    Contact queryCanYuContactByConIdAndUserName(@Param("conId") Integer conId, @Param("deptId") Integer deptId);

    int delContactById(Integer id);

    void submitContactByDetailId(Integer detailId);

    void examineByDetailId(@Param("detailId") Integer detailId, @Param("status") Integer status);

    void updateCanYuStatus1(@Param("detailId") Integer detailId, @Param("status") Integer status);

    void updateExaminePerson(@Param("detailId") Integer detailId, @Param("examineId") int examineId, @Param("examineName") String examineName);

    int delContactSheetById(Integer id);

    List<Contact> queryContactExamineList(Contact contact);

    List<Contact> queryAllContactByDetailId(Integer detailId);

    void updateSheetStatus(@Param("detailId") Integer detailId, @Param("status") Integer status);

    List<Contact> queryContactSelectList(Contact contact);

    void examineTimeAndOpin(@Param("detailId") Integer detailId, @Param("examineOpin") String examineOpin);

    int isZhangorYuan(Integer userId);

    User selectSuoZhangbyKeZhang(Integer userId);

//    String submitSelectDetailContet(Integer detailId);
}
